package com.example.oracle.pojo.system;


/**
 * @author Siaze
 * @date 2021/11/9
 * 返回状态码
 */
public enum WebCode {
    /**
     * 返回给前端的的状态码和msg
     */
    NOT_LOGIN(105, "你还没登录呢"),
    LOGIN_FAIL(101,"登录失败"),
    LOGIN_SUCCESS(100,"登录成功"),
    SYSTEM_ERROR(110, "系统错误"),
    REQUEST_SUCCESS(100, "操作成功"),
    REQUEST_FAIL(102, "操作失败");

    /**
     * 状态码
     */
    private int code;
    /**
     * 提示信息
     */
    private String msg;

    WebCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * 获取code
     * @return code
     */
    public int getCode() {
        return code;
    }

    /**
     * 设置code
     * @param code code
     */
    public void setCode(int code) {
        this.code = code;
    }

    /**
     * 获取msg
     * @return msg
     */
    public String getMsg() {
        return msg;
    }

    /**
     * 设置msg
     * @param msg msg
     */
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
